@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div>
        <div class="form-horizontal" style='overflow:scroll;'>

             <input type="hidden" id="id" name="id" value="${item.carryBasicInformation.id}">
		<div>
			<form id="carryBasicInformation">
				<table border="1" cellpadding="4px" width="1000px">
					<tr>
						<td>基本信息：</td>
						<td colspan="7"></td>
					</tr>
					<tr>
						<td>装车编号:</td>
						<td>${item.carryBasicInformation.carryId}</td>
						<td>装车日期:</td>
						<td>${tool.dateType(item.carryBasicInformation.carryDate)}</td>
						<td>制单员:</td>
						<td>${item.carryBasicInformation.carryTradePerson}</td>
						<td>审核员:</td>
						<td>${username}</td>
					</tr>
					<tr>
						<td>车号:</td>
						<td>${item.carryBasicInformation.carryCarId}</td>
						<td>驾驶员：</td>
						<td>${item.carryBasicInformation.carryCarDriver}</td>
						<td>联系电话：</td>
						<td>${item.carryBasicInformation.carryCarDriverTell}</td>
						<td>手机：</td>
						<td>${item.carryBasicInformation.carryCarDriverMobile}</td>
					</tr>
					<tr>
						<td>车次:</td>
						<td>${item.carryBasicInformation.carryNumber}</td>
						<td>物流线路:</td>
						<td>${item.carryBasicInformation.carryRouteId}</td>
						<td>始发站：</td>
						<td>${item.carryBasicInformation.carryRouteStart}</td>
						<td>到站：</td>
						<td>${item.carryBasicInformation.carryRouteEnd}</td>
					</tr>
					<tr>
						<td>备注：</td>
						<td colspan="7">${item.carryBasicInformation.carryRemark}</td>
					</tr>
				</table>
			</form>
			</div>
			<div style='width:2550px;'>
			<form id="carryContractInformations">
				<table border="1" cellpadding="4px" width="2500px" class="table1">
					<tr>
						<td colspan="23">装车信息：</td>
					</tr>
					<tr>
						<td width="35px">序号</td>
						<td width="120px">合同号</td>
						<td width="70px">发货人</td>
						<td width="100px">发货人电话</td>
						<td width="250px">发货人地址</td>
						<td width="70px">收货人</td>
						<td width="100px">收货人电话</td>
						<td width="250px">收货人地址</td>
						<td width="145px">货物编号</td>
						<td width="250px">货物名称</td>
						<td width="250px">货物规格</td>
						
						<td width="100px">包装方式</td>
						<td width="115px">本次发货数量</td>
						<td width="100px">未发货数量</td>
						<td width="100px">库存总数量</td>
						<td width="90px">数量(件)</td>
						<td width="90px">重量(KG)</td>
						<td width="90px">体积(m³)</td>
						<td width="70px">运费</td>
						<td width="70px">信息费</td>
						<td width="70px">提货费</td>
						<td width="120px">仓库</td>
						<td width="130px">备注</td>
					</tr>
					 @for(carryContractInformation   in   item.carryContractInformations){ 
					<tr class="a" >
						<td>${carryContractInformationLP.index}</td>
						<td >${carryContractInformation.carryContractNumber}</td>
						<td >${carryContractInformation.carryConsignerName}</td>
						<td >${carryContractInformation.carryConsignerTell}</td>
						<td >${carryContractInformation.carryConsignerPlace}</td>
						<td >${carryContractInformation.carryConsigneeName}</td>
						<td >${carryContractInformation.carryConsigneeTell}</td>
						<td>${carryContractInformation.carryConsigneePlace}</td>
						<td>${carryContractInformation.carryGoodsId}</td>
						<td>${carryContractInformation.carryGoodsName}</td>
						<td>${carryContractInformation.carryGoodsModel}</td>
						<td>${carryContractInformation.carryGoodsPackage}</td>
						<td class="carryThisQuantity">${carryContractInformation.carryThisQuantity}</td>
						<td class="carryUnQuantity">${carryContractInformation.carryUnQuantity}</td>
						<td class="carryStockQuantity">${carryContractInformation.carryStockQuantity}</td>
						<td class="carryGoodsQuantity">${carryContractInformation.carryGoodsQuantity}</td>
						<td class="carryGoodsWeight">${carryContractInformation.carryGoodsWeight}</td>
						<td class="carryGoodsVolume">${carryContractInformation.carryGoodsVolume}</td>
						<td class="carryGoodsFreight">${carryContractInformation.carryGoodsFreight}</td>
						<td class="carryGoodsMessagefee">${carryContractInformation.carryGoodsMessagefee}</td> 
						<td class="carryGoodsPickupCharge">${carryContractInformation.carryGoodsPickupCharge}</td> 
						<td>${carryContractInformation.carryGoodsWarehouseName}</td> 
						<td>${carryContractInformation.carryGoodsRemark}</td> 
					</tr>
					@}
					<tr>
						<td >总计:</td>
						<td colspan="11"></td>
						<td id="carryCount"></td>
						<td  id="unCarryCount"></td>
						<td  id="stockCount"></td>
						<td  id="sumCount"></td>
						<td  id="sumWeight"></td>
						<td  id="sumVolume"></td>
						<td  id="sumFreight"></td>
						<td  id="sumMessagefee"></td>
						<td  id="sumPickupCharge"></td>
					</tr>
					</table>
					</form>
			</div>
            <div class="row btn-group-m-t">
             	<div class="col-sm-5">
                </div>
                <div class="col-sm-1">
                    <#button btnCss="info" name="通过" id="ensure" icon="fa-check" clickFun="CarryBasicInformationInfoDlg.editSubmit('yes')"/>
                </div>
                <div class="col-sm-1">
                    <#button btnCss="danger" name="否决" id="cancel" icon="fa-eraser" clickFun="CarryBasicInformationInfoDlg.editSubmit('no')"/>
                </div>
               <div class="col-sm-5">
                </div>
            </div>
        </div>

    </div>
</div>
<script src="${ctxPath}/static/modular/check/carryBasicInformation/carryBasicInformation_info.js"></script>
<script type="text/javascript">
//初始化库存总数量，数量，重量，体积，运费，信息费，提货费信息
function initCount(){
	//初始化库存总数量
	var a = 0;
	$(".carryStockQuantity").each(function(){
		var count ;
		count=Number($(this).text());
        	a += count;
	});
	$("#stockCount").text(a);
	
	//初始化数量
	var b = 0;
	$(".carryGoodsQuantity").each(function(){
		var count ;
		count=Number($(this).text());
        	b+= count;
	});
	$("#sumCount").text(b);
	
	//初始化重量
	var c = 0;
	$(".carryGoodsWeight").each(function(){
		var count ;
		count=Number($(this).text());
        	c+= count;
	});
	$("#sumWeight").text(c);
	
	//初始化体积
	var d = 0;
	$(".carryGoodsVolume").each(function(){
		var count ;
		count=Number($(this).text());
        	d+= count;
	});
	$("#sumVolume").text(d);
	
	//初始化运费
	var f = 0;
	$(".carryGoodsFreight").each(function(){
		var count ;
		count=Number($(this).text());
        	f+= count;
	});
	$("#sumFreight").text(f);
	
	//初始化信息费
	var g = 0;
	$(".carryGoodsMessagefee").each(function(){
		var count ;
		count=Number($(this).text());
        	g+= count;
	});
	$("#sumMessagefee").text(g);
	
	//初始化提货费
	var h = 0;
	$(".carryGoodsPickupCharge").each(function(){
		var count ;
		count=Number($(this).text());
        	h+= count;
	});
	$("#sumPickupCharge").text(h);
	
	//初始化本次发货数量
	var i = 0;
	$(".carryThisQuantity").each(function(){
		var count ;
		count=Number($(this).text());
        	i+= count;
	});
	$("#carryCount").text(i);
	
	
	//初始化未发货数量
	var j = 0;
	$(".carryUnQuantity").each(function(){
		var count ;
		count=Number($(this).text());
        	j+= count;
	});
	$("#unCarryCount").text(j);
}
$(function(){
	initCount();
});
</script>
@}
